package com.lovo.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.bean.Buyorder;
import com.lovo.service.IBuyorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * ??Ӧ?? 前端控制器
 * </p>
 *
 * @author lovo
 * @since 2022-09-17
 */
@RestController
@RequestMapping("hd/buyorder")
public class BuyorderController {

    @Autowired
    IBuyorderService buyorderService;

    @GetMapping("findAllBuyOrder/{pageNO}")
    public IPage<Buyorder> findAllBuyOrder(@PathVariable("pageNO")Integer pageNO){
        return buyorderService.findAllBuyOrder(pageNO);
    }


    @PutMapping("updateBuyOrderStatusById/{id}")
    public String updateBuyOrderStatusById(@PathVariable("id")Integer id){
        buyorderService.updateBuyOrderStatusById(id);
        return "ok";
    }



}
